﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

/// <summary>
/// WebService1 的摘要说明
/// </summary>
[WebService(Namespace = "http://weibo.com/yelloweast")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]//表示复合wsi规范
[System.ComponentModel.ToolboxItem(false)]//表示工具箱的特性
[System.Web.Script.Services.ScriptService]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 

public class WebService1 : System.Web.Services.WebService {

    [WebMethod]
    public string SayHello(string name)
    {
        return "你好 " + name;
    }

    [WebMethod]
    public People Hello()
    {
        People p = new People();
        p.Name = "小王";
        p.Age = 27;

        return p;
    }

    public class People
    {
        private string name;
        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private int age;
        public int Age
        {
            get { return age; }
            set { age = value; }
        }
    }
    
}
